#include  <stdio.h>
#define ARR_SIZE 10
int main(void)
{	         
    int 		a[ARR_SIZE][ARR_SIZE], i, j, n, sum = 0; //1
    long  	product = 1; //1
    printf("Input n:"); //1
    scanf("%d", &n) ; //1
    printf("Input %d*%d matrix:\n", n, n); //1
    for (i = 0; i < n; i++) //1
    { 
        for (j = 0; j < n; j++) //1
        { 
            scanf("%d", &a[i][j]); //1
        }
    }
    for (i = 0; i < n; i++) //1
    {	         
        for (j = 0; j < n; j++) //1
        {	         
            if (i == j || i + j == n - 1) //1
                sum += a[i][j]; //1
            if ((i == j || i + j == n - 1) && i % 2 == 0 && j % 2 == 0) //1
                product *= a[i][j]; //1
        }
    }
    printf("sum = %d\nproduct = %ld\n", sum, product);//1
    return 0;
}